#include "motionControl.h"

motionControl::motionControl(btDynamicsWorld* dynamicsWorld, createMan* man)
{
	_dynamicsWorld = dynamicsWorld;
	_man = man;
	_tr = _man->getGhostObject()->getWorldTransform();
	_origin = _tr.getOrigin();
	_rotation = _tr.getRotation();
}

bool handle(const osgGA::GUIEventAdapter& ea,
	osgGA::GUIActionAdapter& aa)
{
	switch( ea.getEventType() )
	{
	case osgGA::GUIEventAdapter::KEYDOWN:
		{
			switch( ea.getKey() )
			{
			case 'a':
			case 'A':
			case osgGA::GUIEventAdapter::KEY_Left:
				{

					break;
				}
			case 'd':
			case 'D':
			case osgGA::GUIEventAdapter::KEY_Right:
				{

					break;
				}
			case 'w':
			case 'W':
			case osgGA::GUIEventAdapter::KEY_Up:
				{
					break;
				}
			case 's':
			case 'S':
			case osgGA::GUIEventAdapter::KEY_Down:
				{
					break;
				}
			default:
				break;
			}
		}
	default:
		break;
	}

	return true;
}